<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>常用表格属性_表格独有属性</title>
    <style>
        table {
            border: 1px red solid;
            width: 500px;
            /*    控制表格列宽
            table-layout:auto(自动的)，fixed(固定的长度，每个列等长)
            */
            table-layout: fixed;
            /*控制各个单元格间距*/
            border-spacing: 0;
            /*    合并相邻的单元格*/
            
        }

        th, td {
            border: 1px red solid;
        }
    </style>

</head>

<body>
<table>
    <caption>人员信息</caption>
    <thead>
    <tr>
        <th>序号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>政治面貌</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>1</td>
        <td>张三</td>
        <td>18</td>
        <td>男</td>
        <td>党员</td>
    </tr>
    <tr>
        <td>2</td>
        <td>李四</td>
        <td>18</td>
        <td>女</td>
        <td>团员</td>
    </tr>
    <tr>
        <td>3</td>
        <td>王五</td>
        <td>18</td>
        <td>男</td>
        <td>群众</td>
    </tr>
    <tr>
        <td>4</td>
        <td>赵六</td>
        <td>21</td>
        <td>男</td>
        <td>党员</td>
    </tr>
    </tbody>
</table>
</body>
</html>